* remove a guideline
This commit is contained in:
+2
-3
@@ -8,9 +8,8 @@ Guidelines
|
|||||||
with a trailing slash, and please use the dirnames
|
with a trailing slash, and please use the dirnames
|
||||||
in pisiconfig
|
in pisiconfig
|
||||||
2. Python indentation is usually 4 chars.
|
2. Python indentation is usually 4 chars.
|
||||||
3. willUse boyNames()
|
3. Use single quotes for strings if possible
|
||||||
4. Use single quotes for strings if possible
|
4. Follow python philosophy of 'batteries included'
|
||||||
5. Follow python philosophy of 'batteries included'
|
|
||||||
|
|
||||||
Suggestions
|
Suggestions
|
||||||
------------
|
------------
|
||||||
|
|||||||
+17
-1
@@ -3,7 +3,23 @@
|
|||||||
|
|
||||||
import shelve
|
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):
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user