summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Maciaś <ursereg@gmail.com>2011-11-09 17:37:00 +0100
committerMateusz Maciaś <ursereg@gmail.com>2011-11-09 17:37:00 +0100
commitd5f12ba3697269e1d0842925f431478bea6c0115 (patch)
treeaaa95455e1608f0823d5fe1fa86757a38d3a3515
parent2221cf504fc75511e7f52af8ab6bc2ab41f60e1f (diff)
parent74e73df110c970383b0fc143b0d94048882fa552 (diff)
downloaddoorman-d5f12ba3697269e1d0842925f431478bea6c0115.tar.gz
doorman-d5f12ba3697269e1d0842925f431478bea6c0115.tar.bz2
doorman-d5f12ba3697269e1d0842925f431478bea6c0115.tar.xz
doorman-d5f12ba3697269e1d0842925f431478bea6c0115.zip
Resolving upstream conflict.
-rw-r--r--admin/lib/csvstore.py8
-rw-r--r--admin/lib/storage.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/admin/lib/csvstore.py b/admin/lib/csvstore.py
index c4c882c..58a3056 100644
--- a/admin/lib/csvstore.py
+++ b/admin/lib/csvstore.py
@@ -1,20 +1,20 @@
-import StringIO
from UserDict import IterableUserDict
+from StringIO import StringIO
import csv
class Storage(IterableUserDict):
- def __init__(self, file):
+ def __init__(self, encapsulation):
self.encapsulation = encapsulation
self.encapsulation.begin_transaction()
try:
stored = {x[0]: [x[1], x[2]]
- for x in csv.reader([self.encapsulation.data])}
+ for x in csv.reader(StringIO(self.encapsulation.data))}
except IOError:
stored = {}
IterableUserDict.__init__(self, stored)
def sync(self):
- f = StringIO.StringIO()
+ f = StringIO()
csv.writer(f).writerows(
[c, u, name] for c, (u, name) in self.data.iteritems())
diff --git a/admin/lib/storage.py b/admin/lib/storage.py
index 5627ff7..1d5b992 100644
--- a/admin/lib/storage.py
+++ b/admin/lib/storage.py
@@ -5,7 +5,7 @@ import jsonstore
import options
import storage_encapsulation
-if options.storage_encrypt == True
+if options.storage_encrypt == True:
encapsulation_class = storage_encapsulation.DESFileEncapsulation
else:
encapsulation_class = storage_encapsulation.RawFileEncapsulation