diff options
| author | Abhishek Koneru <akoneru@redhat.com> | 2013-07-08 10:42:11 -0400 |
|---|---|---|
| committer | Abhishek Koneru <akoneru@redhat.com> | 2013-07-10 14:10:58 -0400 |
| commit | 11e7d68c265ef48cd024255759a110757c93a032 (patch) | |
| tree | f9598b809742e2eff861f2331e095cf7c76f08da /base/common/python | |
| parent | 55e4a3de4a60c68babf6791ac70285da1a3b475e (diff) | |
| download | pki-11e7d68c265ef48cd024255759a110757c93a032.tar.gz pki-11e7d68c265ef48cd024255759a110757c93a032.tar.xz pki-11e7d68c265ef48cd024255759a110757c93a032.zip | |
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
Diffstat (limited to 'base/common/python')
| -rw-r--r-- | base/common/python/pki/__init__.py | 10 | ||||
| -rw-r--r-- | base/common/python/pki/upgrade.py | 2 |
2 files changed, 6 insertions, 6 deletions
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 <key>: <value> - 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 <key> <delimiter> <value> - 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 <key> <delimiter> <value> - 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 <key> <delimiter> <value> - 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 <key> <delimiter> <value> - 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 <major>.<minor>.<patch> - 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) |
