From 11e7d68c265ef48cd024255759a110757c93a032 Mon Sep 17 00:00:00 2001 From: Abhishek Koneru Date: Mon, 8 Jul 2013 10:42:11 -0400 Subject: Fix issues reported by pylint. Fixed all warnings caused due to absolute import of modules in same package and not marking the regexes with an r when trying to match. Ticket #316 --- base/common/python/pki/__init__.py | 10 +++++----- base/common/python/pki/upgrade.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'base/common/python') diff --git a/base/common/python/pki/__init__.py b/base/common/python/pki/__init__.py index 979bf64d9..bbcffb8a4 100644 --- a/base/common/python/pki/__init__.py +++ b/base/common/python/pki/__init__.py @@ -75,7 +75,7 @@ def implementation_version(): line = line.strip('\n') # parse : - match = re.match('^\s*(\S*)\s*:\s*(.*)\s*$', line) + match = re.match(r'^\s*(\S*)\s*:\s*(.*)\s*$', line) if not match: continue @@ -147,7 +147,7 @@ class PropertyFile(object): for i, line in enumerate(self.lines): # parse - match = re.match('^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line) + match = re.match(r'^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line) if not match: continue @@ -166,7 +166,7 @@ class PropertyFile(object): for line in self.lines: # parse - match = re.match('^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line) + match = re.match(r'^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line) if not match: continue @@ -184,7 +184,7 @@ class PropertyFile(object): for i, line in enumerate(self.lines): # parse - match = re.match('^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line) + match = re.match(r'^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line) if not match: continue @@ -206,7 +206,7 @@ class PropertyFile(object): for i, line in enumerate(self.lines): # parse - match = re.match('^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line) + match = re.match(r'^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line) if not match: continue diff --git a/base/common/python/pki/upgrade.py b/base/common/python/pki/upgrade.py index d1cda6bac..05db24f63 100644 --- a/base/common/python/pki/upgrade.py +++ b/base/common/python/pki/upgrade.py @@ -55,7 +55,7 @@ class Version(object): raise Exception('Invalid version number: ' + obj) # parse .. - match = re.match('^(\d+)\.(\d+)\.(\d+)$', self.version) + match = re.match(r'^(\d+)\.(\d+)\.(\d+)$', self.version) if match is None: raise Exception('Invalid version number: ' + self.version) -- cgit