summaryrefslogtreecommitdiffstats
path: root/cnucnu
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2013-06-28 23:00:38 +0200
committerTill Maas <opensource@till.name>2013-06-28 23:05:13 +0200
commit1c6879c29048b2d23024704daa908283b779f8d1 (patch)
tree5284c5ff99dba099b2c5e73a2cf0ff66862c3c9b /cnucnu
parent72cf0610d11992b5def5274826cdad7e1c1432ed (diff)
downloadcnucnu-1c6879c29048b2d23024704daa908283b779f8d1.tar.gz
cnucnu-1c6879c29048b2d23024704daa908283b779f8d1.tar.xz
cnucnu-1c6879c29048b2d23024704daa908283b779f8d1.zip
various cleanup
Diffstat (limited to 'cnucnu')
-rwxr-xr-xcnucnu/package_list.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/cnucnu/package_list.py b/cnucnu/package_list.py
index d3cd694..8146800 100755
--- a/cnucnu/package_list.py
+++ b/cnucnu/package_list.py
@@ -23,8 +23,9 @@
__docformat__ = "restructuredtext"
# python default modules
+import re
# sre_constants contains re exceptions
-import re, sre_constants
+import sre_constants
import urllib
# cnucnu modules
@@ -39,6 +40,7 @@ from helper import cmp_upstream_repo
import pycurl
from fedora.client.pkgdb import PackageDB
+
class Repository:
def __init__(self, name="", path=""):
if not (name and path):
@@ -147,12 +149,12 @@ class Package(object):
elif regex == "PEAR-DEFAULT":
# strip "php-pear-" prefix only if name was not overridden
if not name_override and name.startswith("php-pear-"):
- name = name[len("php-pear-"):].replace("-","_")
+ name = name[len("php-pear-"):].replace("-", "_")
regex = "DEFAULT"
elif regex == "PECL-DEFAULT":
# strip "php-pecl-" prefix only if name was not overridden
if not name_override and name.startswith("php-pecl-"):
- name = name[len("php-pecl-"):].replace("-","_")
+ name = name[len("php-pecl-"):].replace("-", "_")
regex = "DEFAULT"
elif regex == "RUBYGEMS-DEFAULT":
# strip "rubygem-" prefix only if name was not overridden
@@ -224,12 +226,12 @@ class Package(object):
elif url == "PEAR-DEFAULT":
# strip "php-pear-" prefix only if name was not overridden
if not name_override and name.startswith("php-pear-"):
- name = name[len("php-pear-"):].replace("-","_")
+ name = name[len("php-pear-"):].replace("-", "_")
url = "http://pear.php.net/package/%s/download" % name
elif url == "PECL-DEFAULT":
# strip "php-pecl-" prefix only if name was not overridden
if not name_override and name.startswith("php-pecl-"):
- name = name[len("php-pecl-"):].replace("-","_")
+ name = name[len("php-pecl-"):].replace("-", "_")
url = "http://pecl.php.net/package/%s/download" % name
elif url == "LP-DEFAULT":
url = "https://launchpad.net/%s/+download" % name
@@ -246,7 +248,6 @@ class Package(object):
name = name[len("nodejs-"):]
url = "http://registry.npmjs.org/%s" % name
-
self.__url = url
self.html = None
@@ -312,13 +313,13 @@ class Package(object):
@property
def repo_version(self):
if not self._repo_version:
- self._repo_version = self.repo.package_version(self)
+ self._repo_version = self.repo.package_version(self)
return self._repo_version
@property
def repo_release(self):
if not self._repo_release:
- self._repo_release = self.repo.package_release(self)
+ self._repo_release = self.repo.package_release(self)
return self._repo_release
@property