From 7f5795047822c2a663df49ae6a197a8e51e317d7 Mon Sep 17 00:00:00 2001 From: enkore Date: Tue, 1 Oct 2013 13:04:47 +0200 Subject: [PATCH] core: remove render module --- i3pystatus/core/config.py | 2 +- i3pystatus/core/render.py | 6 ------ i3pystatus/core/util.py | 7 +++++++ 3 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 i3pystatus/core/render.py diff --git a/i3pystatus/core/config.py b/i3pystatus/core/config.py index 94fc2d7..8612bf4 100644 --- a/i3pystatus/core/config.py +++ b/i3pystatus/core/config.py @@ -4,7 +4,7 @@ import runpy import sys import contextlib -from i3pystatus.core.render import render_json +from i3pystatus.core.util import render_json SEARCHPATH = ( "~/.i3pystatus.py", diff --git a/i3pystatus/core/render.py b/i3pystatus/core/render.py deleted file mode 100644 index d45262b..0000000 --- a/i3pystatus/core/render.py +++ /dev/null @@ -1,6 +0,0 @@ - -def render_json(json): - if not json.get("full_text", ""): - return "" - - return json["full_text"] diff --git a/i3pystatus/core/util.py b/i3pystatus/core/util.py index d9d8d50..1162cd4 100644 --- a/i3pystatus/core/util.py +++ b/i3pystatus/core/util.py @@ -270,3 +270,10 @@ class TimeWrapper: H="%02d" % h, M="%02d" % m, S="%02d" % s, l=l, L=L, ).strip() + + +def render_json(json): + if not json.get("full_text", ""): + return "" + + return json["full_text"]