summaryrefslogtreecommitdiff
path: root/azurelinuxagent/pa/provision/default.py
diff options
context:
space:
mode:
Diffstat (limited to 'azurelinuxagent/pa/provision/default.py')
-rw-r--r--azurelinuxagent/pa/provision/default.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/azurelinuxagent/pa/provision/default.py b/azurelinuxagent/pa/provision/default.py
index d4870f1..959a2fe 100644
--- a/azurelinuxagent/pa/provision/default.py
+++ b/azurelinuxagent/pa/provision/default.py
@@ -103,8 +103,11 @@ class ProvisionHandler(object):
@staticmethod
def validate_cloud_init(is_expected=True):
- pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
is_running = False
+ if os.path.isdir("/proc"):
+ pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
+ else:
+ pids = []
for pid in pids:
try:
pname = open(os.path.join('/proc', pid, 'cmdline'), 'rb').read()