Mercurial > gcp
comparison gcp @ 26:d0c00ef2b917
removed color from copy failed error message
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 30 Sep 2010 16:27:28 +0800 |
parents | f82731c70956 |
children | 95f16ff36308 |
comparison
equal
deleted
inserted
replaced
25:f82731c70956 | 26:d0c00ef2b917 |
---|---|
74 const_PRESERVE = set(['mode','ownership','timestamps']) | 74 const_PRESERVE = set(['mode','ownership','timestamps']) |
75 const_FILES_DIR = "~/.gcp" | 75 const_FILES_DIR = "~/.gcp" |
76 const_JOURNAL_PATH = const_FILES_DIR + "/journal" | 76 const_JOURNAL_PATH = const_FILES_DIR + "/journal" |
77 const_SAVED_LIST = const_FILES_DIR + "/saved_list" | 77 const_SAVED_LIST = const_FILES_DIR + "/saved_list" |
78 | 78 |
79 COLOR_RED = "\033[00;31m" | |
80 COLOR_END = '\033[0m' | |
81 | |
82 | |
83 | 79 |
84 | 80 |
85 class DbusObject(dbus.service.Object): | 81 class DbusObject(dbus.service.Object): |
86 | 82 |
87 def __init__(self, gcp, bus, path): | 83 def __init__(self, gcp, bus, path): |
164 partial = set(self.partial) | 160 partial = set(self.partial) |
165 for entry in failed: | 161 for entry in failed: |
166 partial.discard(entry) | 162 partial.discard(entry) |
167 | 163 |
168 if failed: | 164 if failed: |
169 error(_(COLOR_RED+"/!\\ THE FOLLOWING FILES WERE NOT SUCCESSFULY COPIED:" + COLOR_END)) | 165 error(_("/!\\ THE FOLLOWING FILES WERE *NOT* SUCCESSFULY COPIED:")) |
170 #TODO: use logging capability to print all error message in read instead of COLOR_RED | 166 #TODO: use logging capability to print all error message in red |
171 for entry in failed: | 167 for entry in failed: |
172 info("\t- %s" % entry) | 168 info("\t- %s" % entry) |
173 info ('--\n') | 169 info ('--\n') |
174 if partial: | 170 if partial: |
175 warning(_("The following files were copied, but some errors happened:")) | 171 warning(_("The following files were copied, but some errors happened:")) |