From ff431ae30521f294ce4d97d31b19db93cb7c0195 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 30 Oct 2013 18:44:02 +0000 Subject: More pep8 conformance --- MAT/mat.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'MAT/mat.py') diff --git a/MAT/mat.py b/MAT/mat.py index 092ef48..0359dd0 100644 --- a/MAT/mat.py +++ b/MAT/mat.py @@ -31,6 +31,7 @@ logging.basicConfig(filename=fname, level=LOGGING_LEVEL) import strippers # this is loaded here because we need LOGGING_LEVEL + def get_logo(): ''' Return the path to the logo ''' @@ -41,6 +42,7 @@ def get_logo(): elif os.path.isfile('/usr/local/share/pixmaps/mat.png'): return '/usr/local/share/pixmaps/mat.png' + def get_datadir(): ''' Return the path to the data directory ''' @@ -51,6 +53,7 @@ def get_datadir(): elif os.path.isdir('/usr/share/mat/'): return '/usr/share/mat/' + def list_supported_formats(): ''' Return a list of all locally supported fileformat. It parses that FORMATS file, and removes locally @@ -70,6 +73,7 @@ def list_supported_formats(): return localy_supported + class XMLParser(xml.sax.handler.ContentHandler): ''' Parse the supported format xml, and return a corresponding list of dict @@ -132,7 +136,7 @@ def create_class_file(name, backup, **kwargs): logging.error('%s is not a valid file' % name) return None - if not os.access(name, os.R_OK): #check read permissions + if not os.access(name, os.R_OK): # check read permissions logging.error('%s is is not readable' % name) return None @@ -156,7 +160,7 @@ def create_class_file(name, backup, **kwargs): if mime == 'application/zip': # some formats are zipped stuff if mimetypes.guess_type(name)[0]: - mime = mimetypes.guess_type(name)[0] + mime = mimetypes.guess_type(name)[0] if mime.startswith('application/vnd.oasis.opendocument'): mime = 'application/opendocument' # opendocument fileformat -- cgit v1.3