From 93a6ed94c2f71f4f44a4d4487c442efe9df0c435 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 11 Dec 2006 13:02:41 +0000 Subject: [PATCH] removes requirement that /etc/planetlab/plc_config should exist, for use on non-myplc boxes --- Shell.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Shell.py b/Shell.py index e29f039..ff93c66 100755 --- a/Shell.py +++ b/Shell.py @@ -5,7 +5,7 @@ # Mark Huang # Copyright (C) 2005 The Trustees of Princeton University # -# $Id: Shell.py,v 1.14 2006/12/05 16:25:26 thierry Exp $ +# $Id: Shell.py,v 1.15 2006/12/11 11:56:37 thierry Exp $ # import os, sys @@ -53,7 +53,13 @@ class Shell: if config is not None: self.config=config else: - self.config = "/etc/planetlab/plc_config" + # support running on non-myplc boxes + default_config_file = "/etc/planetlab/plc_config" + try: + open (default_config_file).close() + except: + default_config_file="/dev/null" + self.config = default_config_file self.url = None self.method = None self.user = None -- 2.43.0