Skip to content

Commit 1c3970a

Browse files
committed
bug fix: mail domain skip while restore
1 parent 4611c32 commit 1c3970a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.LSOverride
44
*.pyc
55
.idea
6+
venv

plogical/backupUtilities.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,16 @@ def startRestore(backupName, dir):
628628
for childDomain in childDomains:
629629

630630
domain = childDomain.find('domain').text
631+
632+
## mail domain check
633+
634+
mailDomain = 'mail.%s' % (masterDomain)
635+
636+
if domain == mailDomain:
637+
continue
638+
639+
## Mail domain check
640+
631641
phpSelection = childDomain.find('phpSelection').text
632642
path = childDomain.find('path').text
633643

@@ -668,6 +678,7 @@ def startRestore(backupName, dir):
668678

669679
continue
670680
else:
681+
logging.CyberCPLogFileWriter.writeToFile('Error domain %s' % (domain))
671682
logging.CyberCPLogFileWriter.statusWriter(status, "Error Message: " + retValues[1] + ". Not able to create child domains, aborting. [635][5009]")
672683
return 0
673684
except BaseException as msg:

0 commit comments

Comments
 (0)