From 439742ca50db516ce876cffdf7254d23fa9fbd4b Mon Sep 17 00:00:00 2001 From: David Stainton Date: Tue, 2 Jun 2015 10:32:57 -0700 Subject: [PATCH] Move backupdb out of scripts. fixes ticket:2408 --- src/allmydata/{scripts => }/backupdb.py | 0 src/allmydata/frontends/drop_upload.py | 3 ++- src/allmydata/scripts/tahoe_backup.py | 2 +- src/allmydata/test/test_backupdb.py | 2 +- src/allmydata/test/test_cli_backup.py | 3 ++- src/allmydata/test/test_drop_upload.py | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) rename src/allmydata/{scripts => }/backupdb.py (100%) diff --git a/src/allmydata/scripts/backupdb.py b/src/allmydata/backupdb.py similarity index 100% rename from src/allmydata/scripts/backupdb.py rename to src/allmydata/backupdb.py diff --git a/src/allmydata/frontends/drop_upload.py b/src/allmydata/frontends/drop_upload.py index f765df3d..7e2981f8 100644 --- a/src/allmydata/frontends/drop_upload.py +++ b/src/allmydata/frontends/drop_upload.py @@ -12,7 +12,8 @@ from allmydata.util.fileutil import abspath_expanduser_unicode, precondition_abs from allmydata.util.encodingutil import listdir_unicode, to_filepath, \ unicode_from_filepath, quote_local_unicode_path, FilenameEncodingError from allmydata.immutable.upload import FileName -from allmydata.scripts import backupdb + +from allmydata import backupdb class DropUploader(service.MultiService): diff --git a/src/allmydata/scripts/tahoe_backup.py b/src/allmydata/scripts/tahoe_backup.py index f12b3171..e2276406 100644 --- a/src/allmydata/scripts/tahoe_backup.py +++ b/src/allmydata/scripts/tahoe_backup.py @@ -8,7 +8,7 @@ from allmydata.scripts.common import get_alias, escape_path, DEFAULT_ALIAS, \ UnknownAliasError from allmydata.scripts.common_http import do_http, HTTPError, format_http_error from allmydata.util import time_format -from allmydata.scripts import backupdb +from allmydata import backupdb from allmydata.util.encodingutil import listdir_unicode, quote_output, \ quote_local_unicode_path, to_str, FilenameEncodingError, unicode_to_url from allmydata.util.assertutil import precondition diff --git a/src/allmydata/test/test_backupdb.py b/src/allmydata/test/test_backupdb.py index 835e2531..dddfb821 100644 --- a/src/allmydata/test/test_backupdb.py +++ b/src/allmydata/test/test_backupdb.py @@ -6,7 +6,7 @@ from twisted.trial import unittest from allmydata.util import fileutil from allmydata.util.encodingutil import listdir_unicode, get_filesystem_encoding, unicode_platform from allmydata.util.assertutil import precondition -from allmydata.scripts import backupdb +from allmydata import backupdb class BackupDB(unittest.TestCase): def create(self, dbfile): diff --git a/src/allmydata/test/test_cli_backup.py b/src/allmydata/test/test_cli_backup.py index 6d1dbe92..4f2479b2 100644 --- a/src/allmydata/test/test_cli_backup.py +++ b/src/allmydata/test/test_cli_backup.py @@ -8,7 +8,8 @@ from mock import patch from allmydata.util import fileutil from allmydata.util.fileutil import abspath_expanduser_unicode from allmydata.util.encodingutil import get_io_encoding, unicode_to_argv -from allmydata.scripts import cli, backupdb +from allmydata.scripts import cli +from allmydata import backupdb from .common_util import StallMixin from .no_network import GridTestMixin from .test_cli import CLITestMixin, parse_options diff --git a/src/allmydata/test/test_drop_upload.py b/src/allmydata/test/test_drop_upload.py index 01fb4530..0afc29d0 100644 --- a/src/allmydata/test/test_drop_upload.py +++ b/src/allmydata/test/test_drop_upload.py @@ -15,7 +15,7 @@ from allmydata.test.common_util import ReallyEqualMixin, NonASCIIPathMixin from allmydata.test.common import ShouldFailMixin from allmydata.frontends.drop_upload import DropUploader -from allmydata.scripts import backupdb +from allmydata import backupdb from allmydata.util.fileutil import abspath_expanduser_unicode -- 2.45.2