summaryrefslogtreecommitdiffstats
path: root/databaseReset.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip@Muscogee.localdomain>2020-05-24 01:57:06 +0100
committerWookey <wookey@wookware.org>2020-05-24 20:56:27 +0100
commit50d753a87b5f6bc4fe31e222a37796cf903133f7 (patch)
tree885b01fa921893684b602c20392c1ef995e13482 /databaseReset.py
parent35f85c55f14e707e37d822041e25bca2913f48c4 (diff)
downloadtroggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.tar.gz
troggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.tar.bz2
troggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.zip
Convert codebase for python3 usage
Diffstat (limited to 'databaseReset.py')
-rw-r--r--databaseReset.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/databaseReset.py b/databaseReset.py
index f08e3a6..09b3214 100644
--- a/databaseReset.py
+++ b/databaseReset.py
@@ -100,7 +100,7 @@ def import_surveyimgs():
for future re-working to manage progress against notes, plans and elevs.
"""
#import troggle.parsers.surveys
- print("NOT Importing survey images")
+ #print("Importing survey images")
#troggle.parsers.surveys.parseSurveys(logfile=settings.LOGFILE)
def import_surveyscans():
@@ -258,7 +258,7 @@ class JobQueue():
print("-- ", settings.DATABASES['default']['NAME'], settings.DATABASES['default']['ENGINE'])
- #print("-- DATABASES.default", settings.DATABASES['default'])
+ print("-- DATABASES.default", settings.DATABASES['default'])
# but because the user may be expecting to add this to a db with lots of tables already there,
# the jobqueue may not start from scratch so we need to initialise the db properly first
@@ -334,11 +334,7 @@ class JobQueue():
print(" this", end=' ')
else:
# prints one place to the left of where you expect
- if r[len(r)-1]:
- s = r[i]-r[len(r)-1]
- else:
- s = 0
- days = (s)/(24*60*60)
+ days = (r[i]-r[len(r)-1])/(24*60*60)
print('%8.2f' % days, end=' ')
elif r[i]:
print('%8.1f' % r[i], end=' ')