Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NfsClient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Radoslav Bodó
NfsClient
Commits
db1040ab
Commit
db1040ab
authored
Jun 4, 2019
by
Cooper Yang
Committed by
ChunMing Yang
Jun 4, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Update library exception catch
parent
4dcea89b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyNfsClient/pack.py
+5
-3
5 additions, 3 deletions
pyNfsClient/pack.py
with
5 additions
and
3 deletions
pyNfsClient/pack.py
+
5
−
3
View file @
db1040ab
import
struct
import
struct
from
xdrlib
import
Packer
,
Unpacker
,
raise_c
onversion
_e
rror
from
xdrlib
import
Packer
,
Unpacker
,
C
onversion
E
rror
from
xdrlib
import
Error
as
XDRError
from
xdrlib
import
Error
as
XDRError
from
.
import
const
from
.
import
const
from
.
import
rtypes
as
types
from
.
import
rtypes
as
types
...
@@ -23,9 +23,11 @@ class nfs_pro_v3Packer(Packer):
...
@@ -23,9 +23,11 @@ class nfs_pro_v3Packer(Packer):
pack_bool
=
Packer
.
pack_bool
pack_bool
=
Packer
.
pack_bool
pack_uint32
=
pack_uint64
=
pack_uint
pack_uint32
=
pack_uint64
=
pack_uint
@raise_conversion_error
def
pack_uint64
(
self
,
x
):
def
pack_uint64
(
self
,
x
):
try
:
self
.
_Packer__buf
.
write
(
struct
.
pack
(
'
>Q
'
,
x
))
self
.
_Packer__buf
.
write
(
struct
.
pack
(
'
>Q
'
,
x
))
except
struct
.
error
as
e
:
raise
ConversionError
(
e
.
args
[
0
])
def
pack_filename3
(
self
,
data
):
def
pack_filename3
(
self
,
data
):
self
.
pack_string
(
data
)
self
.
pack_string
(
data
)
...
...
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