Skip to content

Commit

Permalink
Remove unused util functions
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Oct 19, 2023
1 parent c6c256c commit ca82bc2
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions src/_ert_job_runner/util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
import os


def read_os_release(pfx="LSB_"):
fname = "/etc/os-release"
if not os.path.isfile(fname):
return {}

def processline(ln):
return ln.strip().replace('"', "")

def splitline(ln, pfx=""):
if ln.count("=") == 1:
k, v = ln.split("=")
return pfx + k, v
return None

props = {}
with open(fname, "r", encoding="utf-8") as f:
for line in f:
kv = splitline(processline(line), pfx=pfx)
if kv:
props[kv[0]] = kv[1]
return props


def pad_nonexisting(path, pad="-- "):
return path if os.path.exists(path) else pad + path
"""
util contains helping functions to create job statuses.
"""

0 comments on commit ca82bc2

Please sign in to comment.