Skip to content
Browse files

minor cleanup on coordinator, and better shell scripts

  • Loading branch information...
1 parent 693fd33 commit 38fc5c9ee91ce980aa86905f1035dcac467c2455 Titus Brown committed Nov 15, 2009
Showing with 19 additions and 4 deletions.
  1. +6 −2 bin/flush-tagset
  2. +12 −0 bin/remove-result
  3. +1 −2 pony_build/coordinator.py
View
8 bin/flush-tagset
@@ -4,8 +4,12 @@ import _mypath
import shelve
from pony_build import coordinator, dbsqlite
-package = sys.argv[1]
-dbfile = dbsqlite.open_shelf(sys.argv[2])
+if len(sys.argv) != 5:
+ print 'Usage: %s <dbfile> <package> <arch> <tags>' % sys.argv[0]
+ sys.exit(0)
+
+dbfile = dbsqlite.open_shelf(sys.argv[1])
+package = sys.argv[2]
dbfile = coordinator.IntDictWrapper(dbfile)
arch = sys.argv[3]
View
12 bin/remove-result
@@ -0,0 +1,12 @@
+#! /usr/bin/env python
+import sys
+import _mypath
+from pony_build import coordinator, dbsqlite
+
+dbfilename = sys.argv[1]
+result_key = sys.argv[2]
+
+dbfile = dbsqlite.open_shelf(dbfilename)
+dbfile = coordinator.IntDictWrapper(dbfile)
+
+del dbfile[result_key]
View
3 pony_build/coordinator.py
@@ -6,7 +6,6 @@
"""
import time
-import sets
from datetime import datetime, timedelta
import UserDict
@@ -56,7 +55,7 @@ def build_tagset(client_info, no_arch=False, no_host=False):
if not no_host:
tags.append('__host=' + host)
- tagset = sets.ImmutableSet(tags)
+ tagset = frozenset(tags)
return tagset
class PonyBuildCoordinator(object):

0 comments on commit 38fc5c9

Please sign in to comment.
Something went wrong with that request. Please try again.