summaryrefslogtreecommitdiff
path: root/contrib/python/cmd/utils.py
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-07-13 16:34:51 -0400
committerGitHub <noreply@github.com>2018-07-13 16:34:51 -0400
commita689639a6502bab3f49b853bc2983c1b44363b2f (patch)
tree75ba256d70545d79aa61d7c57c20df886be1555f /contrib/python/cmd/utils.py
parent14a6d51a8432fc0c3324fec02e8729d3032f2af2 (diff)
parent74ccd9ce5f29a1df4ffe70b4d8bd00c29d5d9d15 (diff)
downloadpodman-a689639a6502bab3f49b853bc2983c1b44363b2f.tar.gz
podman-a689639a6502bab3f49b853bc2983c1b44363b2f.tar.bz2
podman-a689639a6502bab3f49b853bc2983c1b44363b2f.zip
Merge pull request #1081 from jwhonce/wip/client
remote python client for podman
Diffstat (limited to 'contrib/python/cmd/utils.py')
-rw-r--r--contrib/python/cmd/utils.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/contrib/python/cmd/utils.py b/contrib/python/cmd/utils.py
deleted file mode 100644
index d4a14164d..000000000
--- a/contrib/python/cmd/utils.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import sys
-import math
-import datetime
-
-def write_out(output, lf="\n"):
- _output(sys.stdout, output, lf)
-
-
-def write_err(output, lf="\n"):
- _output(sys.stderr, output, lf)
-
-
-def _output(fd, output, lf):
- fd.flush()
- fd.write(output + str(lf))
-
-
-def convert_size(size):
- if size > 0:
- size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
- i = int(math.floor(math.log(size, 1000)))
- p = math.pow(1000, i)
- s = round(size/p, 2) # pylint: disable=round-builtin,old-division
- if s > 0:
- return '%s %s' % (s, size_name[i])
- return '0B'
-
-def stringTimeToHuman(t):
- #datetime.date(datetime.strptime("05/Feb/2016", '%d/%b/%Y'))
- #2018-04-30 13:55:45.019400581 +0000 UTC
- #d = datetime.date(datetime.strptime(t, "%Y-%m-%d"))
- return "sometime ago"