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

Crash on an issue that doesn't have a label #40

Open
ragerdl opened this issue Sep 3, 2014 · 4 comments
Open

Crash on an issue that doesn't have a label #40

ragerdl opened this issue Sep 3, 2014 · 4 comments

Comments

@ragerdl
Copy link

ragerdl commented Sep 3, 2014

Thanks so much for writing and sharing this tool!

I'm finding that the script crashes when the set of labels is empty. Looking at it now to see if I can fix it.

@ragerdl
Copy link
Author

ragerdl commented Sep 3, 2014

A repository to clone that has this property is the "acl2-books" repository.

@ragerdl
Copy link
Author

ragerdl commented Sep 3, 2014

As a workaround, one can "bulk edit" the googlecode issues under the "actions" drop-down.

+1 for googlecode :/

@ragerdl
Copy link
Author

ragerdl commented Sep 3, 2014

It looks like there may be a nice if test to copy around line 111 of
https://github.com/trel/gforge2github/blob/master/gforge2github.py

@rubienr
Copy link

rubienr commented Oct 31, 2014

This works for me:
In migrateissues.py at line 61 I replaced the empty string by an arbitrary one:

def github_label(name, color = "FFFFFF"):
    """ Returns the Github label with the given name, creating it if necessary. """

    if not name:
        name ="NotALabel"

    try:
        return label_cache[name]
    except KeyError:
        try:
            return label_cache.setdefault(name, github_repo.get_label(name))
        except GithubException:
            return label_cache.setdefault(name, github_repo.create_label(name, color))

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

No branches or pull requests

2 participants