11 lines
No EOL
516 B
Python
11 lines
No EOL
516 B
Python
class Directory:
|
|
def __init__(self, name, source, destination, sourcebackup=None, destinationbackup=None):
|
|
self.name = name
|
|
self.source = source
|
|
self.destination = destination
|
|
self.sourcebackup = sourcebackup
|
|
self.destinationbackup = destinationbackup
|
|
|
|
@classmethod
|
|
def from_config(cls, section):
|
|
return cls(section.name.split()[1], section["SourceDirectory"], section["DestinationDirectory"], section.get("SourceBackup"), section.get("DestinationBackup")) |