add generic exceptions
This commit is contained in:
parent
138d1076f5
commit
3aa640ec45
@ -1060,15 +1060,18 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(os_tree_path):
|
if not os.path.exists(os_tree_path):
|
||||||
Shared.treeinfo_new_write(
|
try:
|
||||||
os_tree_path,
|
Shared.treeinfo_new_write(
|
||||||
self.distname,
|
os_tree_path,
|
||||||
self.shortname,
|
self.distname,
|
||||||
self.fullversion,
|
self.shortname,
|
||||||
a,
|
self.fullversion,
|
||||||
int(self.timestamp),
|
a,
|
||||||
repo_name
|
int(self.timestamp),
|
||||||
)
|
repo_name
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
@ -1076,12 +1079,15 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(os_disc_path):
|
if not os.path.exists(os_disc_path):
|
||||||
Shared.discinfo_write(
|
try:
|
||||||
self.timestamp,
|
Shared.discinfo_write(
|
||||||
self.fullname,
|
self.timestamp,
|
||||||
a,
|
self.fullname,
|
||||||
os_disc_path
|
a,
|
||||||
)
|
os_disc_path
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
@ -1089,11 +1095,14 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(os_media_path):
|
if not os.path.exists(os_media_path):
|
||||||
Shared.media_repo_write(
|
try:
|
||||||
self.timestamp,
|
Shared.media_repo_write(
|
||||||
self.fullname,
|
self.timestamp,
|
||||||
os_media_path
|
self.fullname,
|
||||||
)
|
os_media_path
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
@ -1123,15 +1132,18 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(debug_tree_path):
|
if not os.path.exists(debug_tree_path):
|
||||||
Shared.treeinfo_new_write(
|
try:
|
||||||
debug_tree_path,
|
Shared.treeinfo_new_write(
|
||||||
self.distname,
|
debug_tree_path,
|
||||||
self.shortname,
|
self.distname,
|
||||||
self.fullversion,
|
self.shortname,
|
||||||
a,
|
self.fullversion,
|
||||||
self.timestamp,
|
a,
|
||||||
repo_name
|
self.timestamp,
|
||||||
)
|
repo_name
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
@ -1139,12 +1151,15 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(debug_disc_path):
|
if not os.path.exists(debug_disc_path):
|
||||||
Shared.discinfo_write(
|
try:
|
||||||
self.timestamp,
|
Shared.discinfo_write(
|
||||||
self.fullname,
|
self.timestamp,
|
||||||
a,
|
self.fullname,
|
||||||
debug_disc_path
|
a,
|
||||||
)
|
debug_disc_path
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
@ -1152,11 +1167,14 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(debug_media_path):
|
if not os.path.exists(debug_media_path):
|
||||||
Shared.media_repo_write(
|
try:
|
||||||
self.timestamp,
|
Shared.media_repo_write(
|
||||||
self.fullname,
|
self.timestamp,
|
||||||
debug_media_path
|
self.fullname,
|
||||||
)
|
debug_media_path
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
@ -1184,15 +1202,18 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(source_tree_path):
|
if not os.path.exists(source_tree_path):
|
||||||
Shared.treeinfo_new_write(
|
try:
|
||||||
source_tree_path,
|
Shared.treeinfo_new_write(
|
||||||
self.distname,
|
source_tree_path,
|
||||||
self.shortname,
|
self.distname,
|
||||||
self.fullversion,
|
self.shortname,
|
||||||
'src',
|
self.fullversion,
|
||||||
self.timestamp,
|
'src',
|
||||||
repo_name
|
self.timestamp,
|
||||||
)
|
repo_name
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
@ -1200,12 +1221,15 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(source_disc_path):
|
if not os.path.exists(source_disc_path):
|
||||||
Shared.discinfo_write(
|
try:
|
||||||
self.timestamp,
|
Shared.discinfo_write(
|
||||||
self.fullname,
|
self.timestamp,
|
||||||
'src',
|
self.fullname,
|
||||||
source_disc_path
|
'src',
|
||||||
)
|
source_disc_path
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
@ -1213,11 +1237,14 @@ class RepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.exists(source_media_path):
|
if not os.path.exists(source_media_path):
|
||||||
Shared.media_repo_write(
|
try:
|
||||||
self.timestamp,
|
Shared.media_repo_write(
|
||||||
self.fullname,
|
self.timestamp,
|
||||||
source_media_path
|
self.fullname,
|
||||||
)
|
source_media_path
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
self.log.warn(
|
self.log.warn(
|
||||||
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
|
||||||
|
Loading…
Reference in New Issue
Block a user