Merge pull request #42 from sumpfralle/master

replaced dict comprehension (requires Python 2.7) with a simple loop
This commit is contained in:
Roberto Rosario
2013-01-07 21:03:00 -08:00
2 changed files with 7 additions and 5 deletions

View File

@@ -27,14 +27,16 @@ items in the preceeding sets.
# Find all items that don't depend on anything.
extra_items_in_deps = reduce(set.union, data.itervalues()) - set(data.iterkeys())
# Add empty dependences where needed
data.update({item:set() for item in extra_items_in_deps})
for item in extra_items_in_deps:
data[item] = set()
while True:
ordered = set(item for item, dep in data.iteritems() if not dep)
if not ordered:
break
yield ordered
data = {item: (dep - ordered)
for item, dep in data.iteritems()
if item not in ordered}
data = {}
for item, dep in data.iteritems():
if item not in ordered:
data[item] = dep - ordered
assert not data, "Cyclic dependencies exist among these items:\n%s" % '\n'.join(repr(x) for x in data.iteritems())
## end of http://code.activestate.com/recipes/578272/ }}}

View File

@@ -129,7 +129,7 @@ To test your installation, create a file called settings_local.py with the follo
Execute Djangos development server using the ``runserver`` command to launch a local instance of Mayan EDMS::
$ ./manager.py runserver
$ ./manage.py runserver
Point your browser to http://127:0.0.1:8000, if everything was installed
correctly you should see the login screen. After making sure everything