--- a/src/ldt/ldt/management/commands/loadandadddata.py Tue Mar 26 14:49:29 2013 +0100
+++ b/src/ldt/ldt/management/commands/loadandadddata.py Tue Apr 02 12:27:40 2013 +0200
@@ -224,6 +224,17 @@
print("Loading permissions from temporary file %s ..." % path_file2)
call_command("loaddata", path_file2)
+ # Remove temp files
+ print("Removing temporary files...")
+ try:
+ os.remove(path_file1)
+ except:
+ print("Removing temporary files %s failed" % path_file1)
+ try:
+ os.remove(path_file2)
+ except:
+ print("Removing temporary files %s failed" % path_file2)
+
# Now that all datas have been imported we can create the new group and assign permissions if asked
new_group = options.get('new_group', None)
if new_group and len(usernames)>0: