Revision a38447ba
b/image_creator/os_type/__init__.py | ||
---|---|---|
320 | 320 |
|
321 | 321 |
* exclude: Exclude all files that follow this pattern. |
322 | 322 |
""" |
323 |
if not self.image.g.is_dir(directory): |
|
324 |
self.out.warn("Directory: `%s' does not exist!" % directory) |
|
325 |
return |
|
326 |
|
|
323 | 327 |
maxdepth = None if 'maxdepth' not in kargs else kargs['maxdepth'] |
324 | 328 |
if maxdepth == 0: |
325 | 329 |
return |
b/image_creator/os_type/unix.py | ||
---|---|---|
108 | 108 |
def cleanup_mail(self): |
109 | 109 |
"""Remove all files under /var/mail and /var/spool/mail""" |
110 | 110 |
|
111 |
if self.image.g.is_dir('/var/spool/mail'): |
|
112 |
self._foreach_file('/var/spool/mail', self.image.g.rm_rf, |
|
113 |
maxdepth=1) |
|
111 |
self._foreach_file('/var/spool/mail', self.image.g.rm_rf, maxdepth=1) |
|
114 | 112 |
|
115 | 113 |
self._foreach_file('/var/mail', self.image.g.rm_rf, maxdepth=1) |
116 | 114 |
|
Also available in: Unified diff