Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
UCC Snack Machine Server Code
Commits
1433a024
Commit
1433a024
authored
Dec 08, 2014
by
Mark Tearle
Browse files
BUGFIX: FIx up strings in idler
parent
a214f628
Changes
1
Hide whitespace changes
Inline
Side-by-side
VendServer/Idler.py
View file @
1433a024
...
...
@@ -283,7 +283,7 @@ class FortuneIdler(StringIdler):
text
=
"I broke my wookie...."
if
os
.
access
(
fortune
,
os
.
F_OK
|
os
.
X_OK
):
(
lines
,
unused
)
=
Popen
((
fortune
,),
close_fds
=
True
,
stdout
=
PIPE
).
communicate
()
text
=
string
.
join
(
lines
)
text
=
lines
.
replace
(
'
\n
'
,
' '
).
replace
(
'
\r
'
,
''
)
StringIdler
.
__init__
(
self
,
v
,
text
,
repeat
=
False
)
def
affinity
(
self
):
...
...
@@ -294,7 +294,7 @@ class PipeIdler(StringIdler):
text
=
"I ate my cookie...."
if
os
.
access
(
command
,
os
.
F_OK
|
os
.
X_OK
):
(
lines
,
unused
)
=
Popen
([
command
,]
+
args
.
split
(),
close_fds
=
True
,
stdout
=
PIPE
).
communicate
()
text
=
string
.
join
(
lines
)
text
=
lines
.
replace
(
'
\n
'
,
' '
).
replace
(
'
\r
'
,
''
)
StringIdler
.
__init__
(
self
,
v
,
text
,
repeat
=
False
)
def
affinity
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment