diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-02-08 00:31:56 -0600 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-02-08 00:31:56 -0600 |
commit | f837844242142599d1dee84309468624f6dd2048 (patch) | |
tree | ab9c08be96fcb8d1dd37c3c1a4767edd7a057409 /config.py | |
parent | 56194edbc8715f4b5ac94591621dbdce294f5729 (diff) |
Added classes and exceptions
Diffstat (limited to 'config.py')
-rw-r--r-- | config.py | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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) + + |