pylint.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
r"""
|
||||||
________ __________________________
|
________ __________________________
|
||||||
___ __ \__________ /_____ /__(_)_ /_
|
___ __ \__________ /_____ /__(_)_ /_
|
||||||
__ /_/ / _ \ __ /_ __ /__ /_ __/
|
__ /_/ / _ \ __ /_ __ /__ /_ __/
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ def main():
|
|||||||
level=logging.DEBUG,
|
level=logging.DEBUG,
|
||||||
filename=config['log'],
|
filename=config['log'],
|
||||||
format='%(asctime)s:%(levelname)s:%(filename)s:%(lineno)d:%(message)s')
|
format='%(asctime)s:%(levelname)s:%(filename)s:%(lineno)d:%(message)s')
|
||||||
_logger.info('Starting new session, RTV v{}'.format(__version__))
|
_logger.info('Starting new session, RTV v%s', __version__)
|
||||||
else:
|
else:
|
||||||
# Add an empty handler so the logger doesn't complain
|
# Add an empty handler so the logger doesn't complain
|
||||||
logging.root.addHandler(logging.NullHandler())
|
logging.root.addHandler(logging.NullHandler())
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ class Terminal(object):
|
|||||||
|
|
||||||
with codecs.open(filepath, 'w', 'utf-8') as fp:
|
with codecs.open(filepath, 'w', 'utf-8') as fp:
|
||||||
fp.write(data)
|
fp.write(data)
|
||||||
_logger.info('File created: {}'.format(filepath))
|
_logger.info('File created: %s', filepath)
|
||||||
|
|
||||||
editor = os.getenv('RTV_EDITOR') or os.getenv('EDITOR') or 'nano'
|
editor = os.getenv('RTV_EDITOR') or os.getenv('EDITOR') or 'nano'
|
||||||
try:
|
try:
|
||||||
@@ -428,15 +428,15 @@ class Terminal(object):
|
|||||||
# All exceptions will cause the file to *not* be removed, but these
|
# All exceptions will cause the file to *not* be removed, but these
|
||||||
# ones should also be swallowed
|
# ones should also be swallowed
|
||||||
_logger.info('Caught TemporaryFileError')
|
_logger.info('Caught TemporaryFileError')
|
||||||
self.show_notification('Post saved as: {}'.format(filepath))
|
self.show_notification('Post saved as: %s', filepath)
|
||||||
else:
|
else:
|
||||||
# If no errors occurred, try to remove the file
|
# If no errors occurred, try to remove the file
|
||||||
try:
|
try:
|
||||||
os.remove(filepath)
|
os.remove(filepath)
|
||||||
except OSError:
|
except OSError:
|
||||||
_logger.warning('Could not delete: {}'.format(filepath))
|
_logger.warning('Could not delete: %', filepath)
|
||||||
else:
|
else:
|
||||||
_logger.info('File deleted: {}'.format(filepath))
|
_logger.info('File deleted: %', filepath)
|
||||||
|
|
||||||
def text_input(self, window, allow_resize=False):
|
def text_input(self, window, allow_resize=False):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user