Mercurial > hg > PaInt
comparison paint/package.py @ 84:582ffe5e39a0
paint/package.py
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Tue, 17 Sep 2013 17:46:51 -0700 |
| parents | 7f442f585580 |
| children |
comparison
equal
deleted
inserted
replaced
| 83:7f442f585580 | 84:582ffe5e39a0 |
|---|---|
| 114 | 114 |
| 115 def _is_archive(self, path): | 115 def _is_archive(self, path): |
| 116 """returns if the filesystem path is an archive""" | 116 """returns if the filesystem path is an archive""" |
| 117 # TODO: should handle zipfile additionally at least | 117 # TODO: should handle zipfile additionally at least |
| 118 # Ideally, this would be pluggable, etc | 118 # Ideally, this would be pluggable, etc |
| 119 return tarfile.is_tarfile(path) | 119 return (not os.path.isdir(path)) and tarfile.is_tarfile(path) |
| 120 | 120 |
| 121 def _cleanup(self): | 121 def _cleanup(self): |
| 122 if self._tmppath: | 122 if self._tmppath: |
| 123 shutil.rmtree(self._tmppath) | 123 shutil.rmtree(self._tmppath) |
| 124 self._tmppath = None | 124 self._tmppath = None |
