Updated backup.py
This commit is contained in:
parent
36e419bca0
commit
a269859b17
1 changed files with 175 additions and 169 deletions
|
|
@ -14,7 +14,8 @@ REGEX_BAD_PATH_NAMES = re.compile(
|
|||
|
||||
def backup_partition(disk, par):
|
||||
"""Create a backup image of a partition."""
|
||||
if par.get('Image Exists', False) or par['Number'] in disk['Bad Partitions']:
|
||||
if (par.get('Image Exists', False)
|
||||
or par['Number'] in disk['Bad Partitions']):
|
||||
raise GenericAbort
|
||||
|
||||
cmd = [
|
||||
|
|
@ -151,7 +152,10 @@ def select_backup_destination(auto_select=True):
|
|||
|
||||
# Add local disks
|
||||
for d in psutil.disk_partitions():
|
||||
if re.search(r'^{}'.format(global_vars['Env']['SYSTEMDRIVE']), d.mountpoint, re.IGNORECASE):
|
||||
if re.search(
|
||||
r'^{}'.format(global_vars['Env']['SYSTEMDRIVE']),
|
||||
d.mountpoint,
|
||||
re.IGNORECASE):
|
||||
# Skip current OS drive
|
||||
pass
|
||||
elif 'fixed' in d.opts:
|
||||
|
|
@ -203,3 +207,5 @@ def verify_wim_backup(partition):
|
|||
|
||||
if __name__ == '__main__':
|
||||
print("This file is not meant to be called directly.")
|
||||
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
|
|
|||
Loading…
Reference in a new issue