| Index: prebuilt.py
|
| diff --git a/prebuilt.py b/prebuilt.py
|
| index 01f3d331ec8b37cde1773d6a3f6459ab89fb39b1..799253c8cf772cd890eac4008d8a49cb6be158c1 100755
|
| --- a/prebuilt.py
|
| +++ b/prebuilt.py
|
| @@ -92,7 +92,10 @@ def UpdateLocalFile(filename, value, key='PORTAGE_BINHOST'):
|
| value: Value to write with the key.
|
| key: The variable key to update. (Default: PORTAGE_BINHOST)
|
| """
|
| - file_fh = open(filename)
|
| + if os.path.exists(filename):
|
| + file_fh = open(filename)
|
| + else:
|
| + file_fh = open(filename, 'w+')
|
| file_lines = []
|
| found = False
|
| keyval_str = '%(key)s=%(value)s'
|
|
|