From 1e2729cbb0f85bdd52620cf5a323beed55688bc3 Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Wed, 25 Nov 2015 11:41:45 +0000
Subject: [PATCH] Task #8817: moved monthRanges into new module datetimeutils
 in PyCommon

---
 .gitattributes                                                 | 2 +-
 LCS/PyCommon/CMakeLists.txt                                    | 3 ++-
 .../lib/utils.py => LCS/PyCommon/datetimeutils.py              | 0
 LTA/ltastorageoverview/lib/CMakeLists.txt                      | 1 -
 LTA/ltastorageoverview/lib/report.py                           | 2 +-
 LTA/ltastorageoverview/lib/webservice/webservice.py            | 2 +-
 6 files changed, 5 insertions(+), 5 deletions(-)
 rename LTA/ltastorageoverview/lib/utils.py => LCS/PyCommon/datetimeutils.py (100%)

diff --git a/.gitattributes b/.gitattributes
index 66ea92b6057..2031d401bea 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2644,6 +2644,7 @@ LCS/Messaging/test/tMessaging.cc -text
 LCS/Messaging/test/tTimeOut.cc -text
 LCS/PyCommon/CMakeLists.txt -text
 LCS/PyCommon/__init__.py -text
+LCS/PyCommon/datetimeutils.py -text
 LCS/PyCommon/factory.py -text
 LCS/PyCommon/util.py -text
 LCS/Tools/src/checkcomp.py -text
@@ -2906,7 +2907,6 @@ LTA/ltastorageoverview/lib/create_db_ltastorageoverview.sql -text
 LTA/ltastorageoverview/lib/report.py -text
 LTA/ltastorageoverview/lib/scraper.py -text
 LTA/ltastorageoverview/lib/store.py -text
-LTA/ltastorageoverview/lib/utils.py -text
 LTA/ltastorageoverview/lib/webservice/__init__.py -text
 LTA/ltastorageoverview/lib/webservice/templates/index.html -text
 LTA/ltastorageoverview/lib/webservice/webservice.py -text
diff --git a/LCS/PyCommon/CMakeLists.txt b/LCS/PyCommon/CMakeLists.txt
index d419ad2ef75..a4f64ef068f 100644
--- a/LCS/PyCommon/CMakeLists.txt
+++ b/LCS/PyCommon/CMakeLists.txt
@@ -8,6 +8,7 @@ include(PythonInstall)
 
 set(_py_files
   factory.py
-  util.py)
+  util.py
+  datetimeutils.py)
 
 python_install(${_py_files} DESTINATION lofar/common)
diff --git a/LTA/ltastorageoverview/lib/utils.py b/LCS/PyCommon/datetimeutils.py
similarity index 100%
rename from LTA/ltastorageoverview/lib/utils.py
rename to LCS/PyCommon/datetimeutils.py
diff --git a/LTA/ltastorageoverview/lib/CMakeLists.txt b/LTA/ltastorageoverview/lib/CMakeLists.txt
index 208f7deb863..799e321a88c 100644
--- a/LTA/ltastorageoverview/lib/CMakeLists.txt
+++ b/LTA/ltastorageoverview/lib/CMakeLists.txt
@@ -6,7 +6,6 @@ python_install(
     store.py
     create_db_ltastorageoverview.sql
     report.py
-    utils.py
     webservice/webservice.py
     webservice/__init__.py
     DESTINATION ltastorageoverview)
diff --git a/LTA/ltastorageoverview/lib/report.py b/LTA/ltastorageoverview/lib/report.py
index ee374f25663..b77f0a764bd 100755
--- a/LTA/ltastorageoverview/lib/report.py
+++ b/LTA/ltastorageoverview/lib/report.py
@@ -27,7 +27,7 @@ import os
 import os.path
 from ltastorageoverview import store
 from lofar.common.util import humanreadablesize
-from ltastorageoverview.utils import monthRanges
+from lofar.common.datetimeutils import monthRanges
 
 def main(argv):
     dbpath = argv[0] if argv else 'ltastorageoverview.sqlite'
diff --git a/LTA/ltastorageoverview/lib/webservice/webservice.py b/LTA/ltastorageoverview/lib/webservice/webservice.py
index 612c57751f6..7acbf8f8269 100755
--- a/LTA/ltastorageoverview/lib/webservice/webservice.py
+++ b/LTA/ltastorageoverview/lib/webservice/webservice.py
@@ -32,7 +32,7 @@ from flask import render_template
 from flask import json
 from ltastorageoverview import store
 from lofar.common.util import humanreadablesize
-from ltastorageoverview.utils import monthRanges
+from lofar.common.datetimeutils import monthRanges
 
 app = Flask('LTA storage overview')
 app.config.root_path = os.path.dirname(__file__)
-- 
GitLab