{"action":"closed","issue":{"url":"https://api.github.com/repos/cnvogelg/amitools/issues/121","repository_url":"https://api.github.com/repos/cnvogelg/amitools","labels_url":"https://api.github.com/repos/cnvogelg/amitools/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/cnvogelg/amitools/issues/121/comments","events_url":"https://api.github.com/repos/cnvogelg/amitools/issues/121/events","html_url":"https://github.com/cnvogelg/amitools/issues/121","id":537985572,"node_id":"MDU6SXNzdWU1Mzc5ODU1NzI=","number":121,"title":"pack_dir sometimes fails because meta_fsuae was not set","user":{"login":"berlincount","id":545500,"node_id":"MDQ6VXNlcjU0NTUwMA==","avatar_url":"https://avatars0.githubusercontent.com/u/545500?v=4","gravatar_id":"","url":"https://api.github.com/users/berlincount","html_url":"https://github.com/berlincount","followers_url":"https://api.github.com/users/berlincount/followers","following_url":"https://api.github.com/users/berlincount/following{/other_user}","gists_url":"https://api.github.com/users/berlincount/gists{/gist_id}","starred_url":"https://api.github.com/users/berlincount/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berlincount/subscriptions","organizations_url":"https://api.github.com/users/berlincount/orgs","repos_url":"https://api.github.com/users/berlincount/repos","events_url":"https://api.github.com/users/berlincount/events{/privacy}","received_events_url":"https://api.github.com/users/berlincount/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-12-15T00:57:10Z","updated_at":"2019-12-18T20:22:26Z","closed_at":"2019-12-18T20:22:26Z","author_association":"NONE","body":"In https://github.com/cnvogelg/amitools/blob/0b686212f034cb7a886e18507ae02591e1fdd7cc/amitools/fs/Imager.py#L231 `self.meta_fsuae` can be used without intialization when coming in via the ? ? \r\n`write` function.\r\n\r\nReproduction:\r\n\r\n```\r\n$ mkdir foo\r\n$ touch foo/bar\r\n$ xdftool x.adf format x ffs\r\n$ xdftool x.adf write foo\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/xdftool\", line 11, in <module>\r\n    load_entry_point('amitools', 'console_scripts', 'xdftool')()\r\n  File \"/home/count/src/github.com/cnvogel/amitools/amitools/tools/xdftool.py\", line 838, in main\r\n    code = queue.run()\r\n  File \"/home/count/src/github.com/cnvogel/amitools/amitools/tools/xdftool.py\", line 102, in run\r\n    exit_code = CommandQueue.run(self)\r\n  File \"/home/count/src/github.com/cnvogel/amitools/amitools/util/CommandQueue.py\", line 42, in run\r\n    exit_code = self.run_first(cmd_line, cmd)\r\n  File \"/home/count/src/github.com/cnvogel/amitools/amitools/tools/xdftool.py\", line 165, in run_first\r\n    exit_code = cmd.run(self.blkdev, self.volume)\r\n  File \"/home/count/src/github.com/cnvogel/amitools/amitools/tools/xdftool.py\", line 80, in run\r\n    return self.handle_vol(vol)\r\n  File \"/home/count/src/github.com/cnvogel/amitools/amitools/tools/xdftool.py\", line 453, in handle_vol\r\n    img.pack_dir(sys_file, node)\r\n  File \"/home/count/src/github.com/cnvogel/amitools/amitools/fs/Imager.py\", line 227, in pack_dir\r\n    self.pack_entry(sub_path, parent_node)\r\n  File \"/home/count/src/github.com/cnvogel/amitools/amitools/fs/Imager.py\", line 231, in pack_entry\r\n    if self.meta_fsuae.is_meta_file(in_path):\r\nAttributeError: 'NoneType' object has no attribute 'is_meta_file'\r\n```\r\n\r\nI did not investigate further, but it seems like some initialization from `pack_begin` is missing along this code path."}}
{"actor":{"display_login":"cnvogelg"}}