summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-02-08 00:31:56 -0600
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-02-08 00:31:56 -0600
commitf837844242142599d1dee84309468624f6dd2048 (patch)
treeab9c08be96fcb8d1dd37c3c1a4767edd7a057409 /config.py
parent56194edbc8715f4b5ac94591621dbdce294f5729 (diff)
Added classes and exceptions
Diffstat (limited to 'config.py')
-rw-r--r--config.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/config.py b/config.py
index 223257d..6dcd348 100644
--- a/config.py
+++ b/config.py
@@ -39,3 +39,27 @@ blacklist = docs + "/blacklist.txt"
whitelist = docs + "/whitelist.txt"
pending = docs + "/pending"
rsyncBlacklist = docs + "/rsyncBlacklist"
+
+# Classes and Exceptions
+class NonValidFile(ValueError): pass
+class NonValidDir(ValueError): pass
+class NonValidCommand(ValueError): pass
+
+class Package:
+ """ An object that has information about a package. """
+ package_info={ "name" : False,
+ "version" : False,
+ "arch" : False,
+ "license" : False,
+ "location": False}
+
+ def __setitem__(self, key, item):
+ return self.package_info.__setitem__(key, item)
+
+ def __getitem__(self, key):
+ return self.package_info.__getitem__(key)
+
+ def __unicode__(self):
+ return str(self.package_info)
+
+