Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ls - Accept and process a list of dirs #735

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jehadbaeth
Copy link
Contributor

a fix for tahoe ls $THING $OTHERTHING` doesn't work

sample input/output

tahoe -d ./grid/server ls -l test newfile 
test: No such file or directory
-r-- 2475 Jul 01 15:12 newfile```

else:
for directory in where:
rc.append(list_dir(directory))
return min(rc)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return success if at least one operation was a success.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to have the above comment in the code rather than a long-lost PR

url += "?t=json"
resp = do_http("GET", url)
if resp.status == 404:
print("%s: No such file or directory" % directory, file=stderr)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added dir/filename in the error.

@jehadbaeth jehadbaeth force-pushed the bug/2448 branch 6 times, most recently from dc54b99 to 6d3854c Compare July 10, 2020 09:56
@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2020

Codecov Report

Merging #735 (0964ef8) into master (ab57746) will decrease coverage by 0%.
The diff coverage is 90%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #735    +/-   ##
=======================================
- Coverage      92%     92%    -0%     
=======================================
  Files         151     157     +6     
  Lines       27031   27491   +460     
  Branches     4044    4114    +70     
=======================================
+ Hits        24955   25287   +332     
- Misses       1432    1538   +106     
- Partials      644     666    +22     
Impacted Files Coverage Δ
src/allmydata/scripts/tahoe_ls.py 90% <90%> (+<1%) ⬆️
src/allmydata/scripts/cli.py 98% <100%> (+1%) ⬆️
src/allmydata/stats.py 87% <0%> (-13%) ⬇️
src/allmydata/util/jsonbytes.py 88% <0%> (-12%) ⬇️
src/allmydata/nodemaker.py 98% <0%> (-2%) ⬇️
src/allmydata/introducer/common.py 98% <0%> (-2%) ⬇️
src/allmydata/util/configutil.py 98% <0%> (-2%) ⬇️
src/allmydata/util/eliotutil.py 79% <0%> (-2%) ⬇️
src/allmydata/blacklist.py 79% <0%> (-1%) ⬇️
src/allmydata/web/root.py 90% <0%> (-1%) ⬇️
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab57746...8ee8dfe. Read the comment docs.

@jehadbaeth jehadbaeth force-pushed the bug/2448 branch 4 times, most recently from 8c69b1f to dae5e5b Compare July 15, 2020 18:02
Copy link
Contributor

@meejah meejah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants