* remove a guideline

This commit is contained in:
Eray Özkural
2005-06-13 10:18:07 +00:00
parent 00172734f2
commit 2c28495258
2 changed files with 19 additions and 4 deletions
+2 -3
View File
@@ -8,9 +8,8 @@ Guidelines
with a trailing slash, and please use the dirnames
in pisiconfig
2. Python indentation is usually 4 chars.
3. willUse boyNames()
4. Use single quotes for strings if possible
5. Follow python philosophy of 'batteries included'
3. Use single quotes for strings if possible
4. Follow python philosophy of 'batteries included'
Suggestions
------------
+17 -1
View File
@@ -3,7 +3,23 @@
import shelve
d = shelve.open( db_dir + '/fuck yeah')
d = shelve.open( db_dir + '/install.dbm')
class InstallDBError(Exception):
pass
def isRecorded(name, version, release):
return d.has_key( (name, version, release) )
def isInstalled(name, version, release):
return d.has_key( (name, version, release) )
def install( name, version, release, state):
if isInstalled(name,version,release):
raise InstallDBError("already installed")
d[ (name,version,release) ] = state
def remove( name, version, release):
if