def getPackages(self, distribution = "<STR_LIT>"):
if self._packages == {}:<EOL><INDENT>file_location = "<STR_LIT>" % getScriptDir(__file__)<EOL>with open(file_location, "<STR_LIT:r>") as f:<EOL><INDENT>packages = json.load(f)<EOL><DEDENT>for pkg in packages:<EOL><INDENT>for distro in pkg["<STR_LIT>"]:<EOL><INDENT>try:<EOL><INDENT>self._packages[distro].append(pkg["<STR_LIT>"])<EOL><DEDENT>except KeyError:<EOL><INDENT>self._packages[distro] = [pkg["<STR_LIT>"]]<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return self._packages[distribution]<EOL>
:param distribution: package distribution
:type  distribution: string
:returns: [string]
:raises KeyError: if distribution not found