Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
maubot-exec-cmd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
isgphys
maubot-exec-cmd
Commits
9d4ab5ea
Commit
9d4ab5ea
authored
1 year ago
by
Jesse Nava
Browse files
Options
Downloads
Patches
Plain Diff
update for current dependencies
parent
13769fa2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
exec/bot.py
+1
-1
1 addition, 1 deletion
exec/bot.py
exec/runner/base.py
+2
-2
2 additions, 2 deletions
exec/runner/base.py
exec/runner/shell.py
+2
-1
2 additions, 1 deletion
exec/runner/shell.py
with
5 additions
and
4 deletions
exec/bot.py
+
1
−
1
View file @
9d4ab5ea
...
...
@@ -97,7 +97,7 @@ class ExecBot(Plugin):
or
not
evt
.
content
.
formatted_body
)):
return
command
=
EntityParser
.
parse
(
evt
.
content
.
formatted_body
)
command
=
await
EntityParser
()
.
parse
(
evt
.
content
.
formatted_body
)
entity
:
SimpleEntity
code
:
Optional
[
str
]
=
None
lang
:
Optional
[
str
]
=
None
...
...
This diff is collapsed.
Click to expand it.
exec/runner/base.py
+
2
−
2
View file @
9d4ab5ea
...
...
@@ -33,9 +33,9 @@ class AsyncTextOutput:
closed
:
bool
def
__init__
(
self
,
loop
:
Optional
[
AbstractEventLoop
]
=
None
)
->
None
:
self
.
loop
=
loop
or
get_event_loop
()
self
.
loop
=
get_event_loop
()
self
.
read_task
=
None
self
.
queue
=
Queue
(
loop
=
self
.
loop
)
self
.
queue
=
Queue
()
self
.
closed
=
False
def
__aiter__
(
self
)
->
'
AsyncTextOutput
'
:
...
...
This diff is collapsed.
Click to expand it.
exec/runner/shell.py
+
2
−
1
View file @
9d4ab5ea
...
...
@@ -80,7 +80,7 @@ class ShellRunner(Runner):
)
->
AsyncGenerator
[
Tuple
[
OutputType
,
Union
[
str
,
int
]],
None
]:
loop
=
loop
or
asyncio
.
get_event_loop
()
output
=
AsyncTextProxy
()
proc
=
await
asyncio
.
create_subprocess_shell
(
code
,
loop
=
loop
,
proc
=
await
asyncio
.
create_subprocess_shell
(
code
,
stdin
=
asyncio
.
subprocess
.
PIPE
,
stdout
=
asyncio
.
subprocess
.
PIPE
,
stderr
=
asyncio
.
subprocess
.
PIPE
)
...
...
@@ -91,6 +91,7 @@ class ShellRunner(Runner):
waiter
=
asyncio
.
ensure_future
(
self
.
_wait_proc
(
proc
,
output
),
loop
=
loop
)
async
for
part
in
output
:
yield
part
print
(
output
)
yield
(
OutputType
.
RETURN
,
await
waiter
)
def
format_exception
(
self
,
exc_info
:
Any
)
->
Tuple
[
Optional
[
str
],
Optional
[
str
]]:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment