summaryrefslogtreecommitdiffstats
path: root/base/common/python
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2013-06-25 00:38:30 -0400
committerAbhishek Koneru <akoneru@redhat.com>2013-06-27 15:38:50 -0400
commitc1d47410a09ed7f15ff929021b3815137f5ff94e (patch)
treec8de83c5dead38c5162a6e20d6aca64c285262dd /base/common/python
parent66c34cfbe1ca67c7ad7b5fddae26cd1b2d53e8c4 (diff)
downloadpki-c1d47410a09ed7f15ff929021b3815137f5ff94e.tar.gz
pki-c1d47410a09ed7f15ff929021b3815137f5ff94e.tar.xz
pki-c1d47410a09ed7f15ff929021b3815137f5ff94e.zip
Applied PEP8 formatting to python files.
General formatting done for all the python files except for the line length issue, which could not be formatted using Pydev in Eclipse. Ticket #316
Diffstat (limited to 'base/common/python')
-rw-r--r--base/common/python/pki/__init__.py10
-rw-r--r--base/common/python/pki/client.py2
-rw-r--r--base/common/python/pki/system.py2
-rw-r--r--base/common/python/pki/upgrade.py18
4 files changed, 16 insertions, 16 deletions
diff --git a/base/common/python/pki/__init__.py b/base/common/python/pki/__init__.py
index 404aa92d4..979bf64d9 100644
--- a/base/common/python/pki/__init__.py
+++ b/base/common/python/pki/__init__.py
@@ -23,12 +23,12 @@ import os
import re
-CONF_DIR = '/etc/pki'
-SHARE_DIR = '/usr/share/pki'
-BASE_DIR = '/var/lib'
-LOG_DIR = '/var/log/pki'
+CONF_DIR = '/etc/pki'
+SHARE_DIR = '/usr/share/pki'
+BASE_DIR = '/var/lib'
+LOG_DIR = '/var/log/pki'
-PACKAGE_VERSION = SHARE_DIR + '/VERSION'
+PACKAGE_VERSION = SHARE_DIR + '/VERSION'
def read_text(message,
diff --git a/base/common/python/pki/client.py b/base/common/python/pki/client.py
index 05f42ba06..00343bb7c 100644
--- a/base/common/python/pki/client.py
+++ b/base/common/python/pki/client.py
@@ -35,7 +35,7 @@ class PKIConnection:
self.port = port
self.subsystem = subsystem
- self.serverURI = self.protocol + '://' +\
+ self.serverURI = self.protocol + '://' + \
self.hostname + ':' + self.port + '/' + \
self.subsystem
diff --git a/base/common/python/pki/system.py b/base/common/python/pki/system.py
index 5b4caf7f3..4dd3baac2 100644
--- a/base/common/python/pki/system.py
+++ b/base/common/python/pki/system.py
@@ -87,7 +87,7 @@ class SystemStatusClient:
self.connection = connection
def getStatus(self):
- r = self.connection.get('/admin/' +\
+ r = self.connection.get('/admin/' + \
self.connection.subsystem + '/getStatus')
return r.text
diff --git a/base/common/python/pki/upgrade.py b/base/common/python/pki/upgrade.py
index 9f927130f..e9e40b15c 100644
--- a/base/common/python/pki/upgrade.py
+++ b/base/common/python/pki/upgrade.py
@@ -29,12 +29,12 @@ import pki
import pki.util
-DEFAULT_VERSION = '10.0.0'
+DEFAULT_VERSION = '10.0.0'
-UPGRADE_DIR = pki.SHARE_DIR + '/upgrade'
-BACKUP_DIR = pki.LOG_DIR + '/upgrade'
-SYSTEM_TRACKER = pki.CONF_DIR + '/pki.version'
-verbose = False
+UPGRADE_DIR = pki.SHARE_DIR + '/upgrade'
+BACKUP_DIR = pki.LOG_DIR + '/upgrade'
+SYSTEM_TRACKER = pki.CONF_DIR + '/pki.version'
+verbose = False
@functools.total_ordering
@@ -172,14 +172,14 @@ class PKIUpgradeTracker(object):
i = self.properties.index(self.version_key)
if i >= 0:
# if version exists, add index after version
- self.properties.set(self.index_key, str(index), index=i+1)
+ self.properties.set(self.index_key, str(index), index=i + 1)
else:
# otherwise, add index at the end separated by a blank line
# if last line is not empty, append empty line
length = len(self.properties.lines)
- if length > 0 and self.properties.lines[length-1] != '':
+ if length > 0 and self.properties.lines[length - 1] != '':
self.properties.insert_line(length, '')
length = length + 1
@@ -219,7 +219,7 @@ class PKIUpgradeTracker(object):
# if last line is not empty, append empty line
length = len(self.properties.lines)
- if length > 0 and self.properties.lines[length-1] != '':
+ if length > 0 and self.properties.lines[length - 1] != '':
self.properties.insert_line(length, '')
length = length + 1
@@ -460,7 +460,7 @@ class PKIUpgrader(object):
raise pki.PKIException('Invalid scriptlet name: ' + filename, e)
index = int(filename[0:i])
- classname = filename[i+1:]
+ classname = filename[i + 1:]
if self.index and index != self.index:
continue