summaryrefslogtreecommitdiffstats
path: root/src/virtual
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-04-17 16:59:48 +0200
committerRoberto Hueso Gómez <rhueso@soleta.eu>2020-04-17 16:59:48 +0200
commit2e3d47b7b8db69edb5d550ccc4a46fd6512fc031 (patch)
tree0993c5fb7a71cd039ba5b2ea930a0be228894ff0 /src/virtual
parent7ccc4980147954b68829d5555fcc9e5b7dd2c4ec (diff)
Avoid writting /software output to a file
Diffstat (limited to 'src/virtual')
-rw-r--r--src/virtual/ogOperations.py6
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 = {}