cmds.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:demos 作者: dfirence 项目源码 文件源码
def set_imageinfo( memoryFilePath ):
    path = r'{}'.format( memoryFilePath )
    path = os.path.abspath( path )
    try:
        if os.access( path, os.F_OK):
            if  os.access( path, os.R_OK ):
                cwd       = os.getcwd()
                imageinfo = [ 'vol.py', '-f', '{}'.format( path ), 'imageinfo',  \
                                        '--output=text', \
                                        '--output-file={}'.format( os.path.join( cwd, 'imageinfo.text' ))]
                return imageinfo
            else:
                print '\n[!] Error File Permissions: No Read Access for {}\n'.format( path )
        else:
            print '\n[!] Error FilePath:  Does not exist {}\n'.format( path )

    except Exception as set_imageinfo_error:
        print '[!] EXCEPTION ERROR:  < set_imageinfo > function'
        print set_imageinfo_error
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号