"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Tardis/CacheDir.py" between
Tardis-1.1.5.tar.gz and Tardis-1.2.1.tar.gz

About: Tardis is a system for making encrypted, incremental backups of filesystems.

CacheDir.py  (Tardis-1.1.5):CacheDir.py  (Tardis-1.2.1)
skipping to change at line 124 skipping to change at line 124
def mkdir(self, name): def mkdir(self, name):
directory = self.dirPath(name) directory = self.dirPath(name)
if not os.path.isdir(directory): if not os.path.isdir(directory):
os.makedirs(directory) os.makedirs(directory)
if self.chown: if self.chown:
path = self.root path = self.root
for i in self.comps(name): for i in self.comps(name):
path = os.path.join(path, i) path = os.path.join(path, i)
os.chown(path, self.user, self.group) os.chown(path, self.user, self.group)
def open(self, name, mode): def open(self, name, mode, streaming=False):
iswrite = mode.startswith('w') or mode.startswith('a') iswrite = mode.startswith('w') or mode.startswith('a')
if iswrite: if iswrite:
self.mkdir(name) self.mkdir(name)
path = self.path(name) path = self.path(name)
f = open(path, mode) f = open(path, mode)
if iswrite and self.chown: if iswrite and self.chown:
os.fchown(f.fileno(), self.user, self.group) os.fchown(f.fileno(), self.user, self.group)
return f return f
def insert(self, name, source, link=False): def insert(self, name, source, link=False):
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)