Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
178
Issues
178
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
1b974d2d
Commit
1b974d2d
authored
May 12, 2020
by
Maxime Buquet
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'upload-exceptions' into 'master'
plugins/upload: handle more exceptions See merge request
!97
parents
ac3fb695
8b385a0c
Pipeline
#3094
failed with stages
in 5 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
plugins/upload.py
plugins/upload.py
+4
-1
No files found.
plugins/upload.py
View file @
1b974d2d
...
...
@@ -24,7 +24,7 @@ import traceback
from
os.path
import
expanduser
from
glob
import
glob
from
slixmpp.plugins.xep_0363.http_upload
import
UploadServiceNotFound
from
slixmpp.plugins.xep_0363.http_upload
import
FileTooBig
,
HTTPError
,
UploadServiceNotFound
from
poezio.plugin
import
BasePlugin
from
poezio.core.structs
import
Completion
...
...
@@ -56,6 +56,9 @@ class Plugin(BasePlugin):
except
UploadServiceNotFound
:
self
.
api
.
information
(
'HTTP Upload service not found.'
,
'Error'
)
return
None
except
(
FileTooBig
,
HTTPError
)
as
exn
:
self
.
api
.
information
(
str
(
exn
),
'Error'
)
return
None
except
Exception
:
exception
=
traceback
.
format_exc
()
self
.
api
.
information
(
'Failed to upload file: %s'
%
exception
,
...
...
Write
Preview
Markdown
is supported
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