diff options
| author | Thomas Bechtold <thomas.bechtold@canonical.com> | 2022-04-19 13:12:08 +0200 |
|---|---|---|
| committer | Thomas Bechtold <thomas.bechtold@canonical.com> | 2022-04-19 13:12:08 +0200 |
| commit | 39446b786c727feb1f506c6b9d376fa789837602 (patch) | |
| tree | 28d49f1f66f0ecd15a1e47316282940be3264f19 | |
| parent | da2d5005aca2a41d392de2c788a69cfc2765ab83 (diff) | |
| parent | af42cb48b30ce16d55269140d94708cbc3885615 (diff) | |
Fix AttributeError: module 'os' has no attribute 'errno' MP: https://code.launchpad.net/~toabctl/cloud-images/+git/mfdiff/+merge/419658
| -rw-r--r-- | ubuntu/cloudimage/mfdiff/manifestcache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ubuntu/cloudimage/mfdiff/manifestcache.py b/ubuntu/cloudimage/mfdiff/manifestcache.py index e92e925..bde654c 100644 --- a/ubuntu/cloudimage/mfdiff/manifestcache.py +++ b/ubuntu/cloudimage/mfdiff/manifestcache.py @@ -19,6 +19,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import apt +import errno import logging import os import re @@ -209,7 +210,7 @@ class ManifestCache(object): try: os.makedirs("%s/etc/apt" % self._cache_d) except OSError as oserror: - if os.errno.EEXIST != oserror.errno: + if errno.EEXIST != oserror.errno: raise with open("%s/etc/apt/sources.list" % self._cache_d, "w") as asl: asl.write('\n'.join(srclines)) |
