Skip to content

Commit 9f02cf1

Browse files
drew-512sbinet
andauthored
Update modules/runtime.go
Co-authored-by: Sebastien Binet <binet@cern.ch>
1 parent c1f8809 commit 9f02cf1

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

modules/runtime.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,7 @@ var defaultPaths = []py.Object{
170170
func resolveRunPath(runPath string, opts py.CompileOpts, pathObjs []py.Object, tryPath func(pyPath string) (bool, error)) error {
171171
var cwd string
172172

173-
// Remove trailing slash if present
174-
if runPath[len(runPath)-1] == '/' {
175-
runPath = runPath[:len(runPath)-1]
176-
}
173+
runPath = strings.TrimSuffix(runPath, "/")
177174

178175
var err error
179176

0 commit comments

Comments
 (0)