diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-09-14 06:06:17 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-09-14 06:06:17 +0000 |
| commit | 7df947f7dcf593d1613212de877ac5217cdbac0f (patch) | |
| tree | 0161b325677d0075f2ad646d2589d7134d7763af | |
| parent | 9e81075621950afd86a129c7c9e8380019e15597 (diff) | |
| parent | 918a02d5cc3c845bcd58e00fcdf2728e78dafa26 (diff) | |
Merge "Fixes import issue on Windows"
| -rw-r--r-- | nova/virt/disk/api.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py index 008445a4a..16bd9fe04 100644 --- a/nova/virt/disk/api.py +++ b/nova/virt/disk/api.py @@ -25,11 +25,13 @@ Includes injection of SSH PGP keys into authorized_keys file. """ -import crypt import os import random import tempfile +if os.name != 'nt': + import crypt + from nova import exception from nova import flags from nova.openstack.common import cfg @@ -511,6 +513,9 @@ def _set_passwd(username, admin_passwd, passwd_file, shadow_file): :raises: exception.NovaException(), IOError() """ + if os.name == 'nt': + raise exception.NovaException(_('Not implemented on Windows')) + salt_set = ('abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' '0123456789./') |
