Skip to content

Commit

Permalink
Fix for fortune on Arch Linux ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
tsbarnes committed Oct 13, 2021
1 parent d519412 commit ce1e3e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion screens/fortune.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@

from screens import AbstractScreen

try:
from local_settings import FORTUNE_PATH
except ImportError:
FORTUNE_PATH = "fortune"


class Screen(AbstractScreen):
def reload(self):
try:
child = subprocess.Popen(['/usr/games/fortune'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
child = subprocess.Popen([FORTUNE_PATH], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
string = child.stdout.read().decode().replace('\n', ' ')
except OSError:
logging.error("couldn't run application 'fortune'")
Expand Down

0 comments on commit ce1e3e4

Please sign in to comment.