Skip to content

Python update #10

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions git_explode/exploder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import copy
import six
from ostruct import OpenStruct

from git_deps.detector import DependencyDetector
from git_deps.gitutils import GitUtils
Expand All @@ -12,6 +11,11 @@
from git_explode.listener import ExplodeDependencyListener
from git_explode.topics import TopicManager

class OpenStruct:
def __init__(self, data):
self.__dict__.update(data)
def __getattr__(self, key):
return self.__dict__[key] if key in self.__dict__ else None

class GitExploder(object):
"""Explode a linear sequence of git commits into multiple independent
Expand Down Expand Up @@ -120,7 +124,7 @@ def prepare_cherrypick_base(self, sha, deps, commits):
self.checkout_new(branch, self.base)
return

deps = deps.keys()
deps = list(deps.keys())
assert len(deps) >= 1
self.logger.debug(" deps: %s" % ' '.join([d[:8] for d in deps]))

Expand Down