Code Monkey home page Code Monkey logo

Comments (5)

kparal avatar kparal commented on September 15, 2024

Thanks for reporting. Patches welcome.

from gkeyring.

chicks-net avatar chicks-net commented on September 15, 2024

Any suggestions on how to debug it?

from gkeyring.

joergschulz avatar joergschulz commented on September 15, 2024

There is a bug that might trigger this if you have a key with the same name test_gkeyring in another keyring. gk.find_items() returns items from any keyring. But gk.item_get_info() is called with keyring from --keyring argument. If this key doesn't exist a BadArgumentError is thrown and the for-loop silently aborts. So line 269 has to be:

-                    info = gk.item_get_info_sync(self.keyring, match.item_id)
+                    info = gk.item_get_info_sync(match.keyring, match.item_id)

And the program should at least print an error:

-        except gk.Error:
+        except gk.Error as e:
+            print e.__class__, e.message

From your usage of the program above
$ gkeyring --keyring graphs_life --n test_gkeyring
one can conclude that you expect that the --keyring argument is a kind of selector.
But this is only true if you use it in combination with the --id argument.
To use it as an selector you could write:

                 for match in matches:
+                    if match.keyring != self.keyring:
+                        continue
                     result = {'id': match.item_id, 'secret': match.secret,

If you use it this way maybe it woud be better to allow an undefined keyring in option parsing instead of using the default keyring.

from gkeyring.

kparal avatar kparal commented on September 15, 2024

Hi, can you create a pull request? Thanks.

from gkeyring.

kparal avatar kparal commented on September 15, 2024

@chicks-net Could work now.

from gkeyring.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.