self.__update_local_fs(from_path=from_path)
def _update_mongo_fs(self, from_path):
-
os_path = self.path + from_path
# Obtain list of files and dirs in filesystem
remote_files.pop(rel_filename, None)
if last_modified_date >= upload_date:
-
stream = None
fh = None
try:
self.fs.delete(file._id)
def _get_mongo_files(self, from_path=None):
-
file_dict = {}
file_cursor = self.fs.find(no_cursor_timeout=True, sort=[("uploadDate", -1)])
for file in file_cursor:
--- /dev/null
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+---
+other:
+ - |
+ Fixing black and cover errors in common v12.0
+
+ The update of the version of black is detecting
+ new issues taht this commit addresses.
+
+ The use of whitelist_externals in tox.ini has been
+ replaced by allowlist_externals, with the new version
+ of tox. This will allow cover tests to pass
coverage report --omit='*tests*'
coverage html -d ./cover --omit='*tests*'
coverage xml -o coverage.xml --omit=*tests*
-whitelist_externals = sh
+allowlist_externals = sh
#######################################################################################
[testenv:flake8]
[testenv:pip-compile]
deps = pip-tools==6.6.2
skip_install = true
-whitelist_externals = bash
+allowlist_externals = bash
[
commands =
- bash -c "for file in requirements*.in ; do \
python3 setup.py --command-packages=stdeb.command sdist_dsc
sh -c 'cd deb_dist/osm-common*/ && dpkg-buildpackage -rfakeroot -uc -us'
sh -c 'rm osm_common/requirements.txt'
-whitelist_externals = sh
+allowlist_externals = sh
#######################################################################################
[testenv:release_notes]
deps = reno
skip_install = true
-whitelist_externals = bash
+allowlist_externals = bash
commands =
reno new {posargs:new_feature}
bash -c "sed -i -e '1 e head -16 tox.ini' releasenotes/notes/{posargs:new_feature}*.yaml"