diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-04-17 16:59:48 +0200 |
---|---|---|
committer | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-04-17 16:59:48 +0200 |
commit | 2e3d47b7b8db69edb5d550ccc4a46fd6512fc031 (patch) | |
tree | 0993c5fb7a71cd039ba5b2ea930a0be228894ff0 /src/virtual/ogOperations.py | |
parent | 7ccc4980147954b68829d5555fcc9e5b7dd2c4ec (diff) |
Avoid writting /software output to a file
Diffstat (limited to 'src/virtual/ogOperations.py')
-rw-r--r-- | src/virtual/ogOperations.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py index a9cf06b..bc18dd4 100644 --- a/src/virtual/ogOperations.py +++ b/src/virtual/ogOperations.py @@ -358,11 +358,7 @@ class OgVirtualOperations: software += [h.node_name(x) for x in h.node_children(key)] os.remove('win_reg') - with open(path, 'w+') as f: - f.seek(0) - for program in software: - f.write(f'{program}\n') - f.truncate() + return '\n'.join(software) def parse_pci(self, path='/usr/share/misc/pci.ids'): data = {} |