gcp: vertical spacing

This commit is contained in:
Matteo Cypriani 2018-10-16 10:31:15 +02:00
parent 462676e803
commit 9469a59718
1 changed files with 2 additions and 8 deletions

10
gcp
View File

@ -81,7 +81,6 @@ const_JOURNAL_PATH = const_FILES_DIR + "/journal"
const_SAVED_LIST = const_FILES_DIR + "/saved_list" const_SAVED_LIST = const_FILES_DIR + "/saved_list"
class DbusObject(dbus.service.Object): class DbusObject(dbus.service.Object):
def __init__(self, gcp, bus, path): def __init__(self, gcp, bus, path):
@ -116,7 +115,9 @@ class DbusObject(dbus.service.Object):
return (False, _("INTERNAL ERROR: invalid source_dir")) return (False, _("INTERNAL ERROR: invalid source_dir"))
return self._gcp.parseArguments(args, source_dir) return self._gcp.parseArguments(args, source_dir)
class Journal(): class Journal():
def __init__(self, path=const_JOURNAL_PATH): def __init__(self, path=const_JOURNAL_PATH):
self.journal_path = os.path.expanduser(path) self.journal_path = os.path.expanduser(path)
self.journal_fd = open(self.journal_path,'w') #TODO: check and maybe save previous journals self.journal_fd = open(self.journal_path,'w') #TODO: check and maybe save previous journals
@ -183,8 +184,6 @@ class Journal():
info(_("Please check journal: %s") % self.journal_path) info(_("Please check journal: %s") % self.journal_path)
class GCP(): class GCP():
def __init__(self): def __init__(self):
@ -258,7 +257,6 @@ class GCP():
error(_("Can't copy %(path)s: %(exception)s") error(_("Can't copy %(path)s: %(exception)s")
% {'path':path, 'exception':e.strerror}) % {'path':path, 'exception':e.strerror})
def __appendDirToList(self, dirpath, dest_path, options): def __appendDirToList(self, dirpath, dest_path, options):
"""Add recursively directory to the copy list """Add recursively directory to the copy list
@param path: absolute path of dir @param path: absolute path of dir
@ -377,8 +375,6 @@ class GCP():
source_fd.close() source_fd.close()
dest_fd.close() dest_fd.close()
def _copyFile(self, source_fd, condition, data): def _copyFile(self, source_fd, condition, data):
"""Actually copy the file, callback used with io_add_watch """Actually copy the file, callback used with io_add_watch
@param source_fd: file descriptor of the file to copy @param source_fd: file descriptor of the file to copy
@ -520,7 +516,6 @@ class GCP():
if not args: if not args:
exit(0) exit(0)
if options.sources_list or options.sources_full_list: if options.sources_list or options.sources_full_list:
info(_('Saved sources:')) info(_('Saved sources:'))
sources = list(saved_files.keys()) sources = list(saved_files.keys())
@ -752,4 +747,3 @@ if __name__ == "__main__":
exit(1) exit(1)
if gcp.journal.partial: if gcp.journal.partial:
exit(2) exit(2)